<php> $this->display(tpl('head')); </php>
<style>
	.layui-table{
		margin: 2%;
		width: 96%;
	}
	.edit a{
		background-color: #007DDB;
		padding: 5px 10px;
		border-radius: 5px;
		color: #fff;
	}
	.edit a:hover{
		background-color: initial;
		border: 1px solid #007DDB;
		color: #000;
	}
</style>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  	<legend>用户组权限管理</legend>
</fieldset>

<table class="layui-table">
	  <thead>
		    <tr>
			    <th width="100">GROUPID</th>
			    <th>用户组名称</th>
			    <th>用户组类别</th>
			    <th style="text-align: center; width: 100px;">用户组成员</th>
			    <th  style="text-align: center; ">操作</th>
		    </tr>
	  </thead>
	  <tbody>
		  <foreach array="user_groupDB">
			<php>
				$type= $row['type']=='1' ? "普通会员组" : "高级系统组";
			</php>
		    <tr>
			    <td>{{$row['id'] }}</td>
			    <td >{{$row['name'] }}</td>
			    <td>{{$type }}</td>
			    <td align="center"><a href="" ><img width="20" src="/public/admin/images/users.png"></a></td>
			    <td align="center" class="edit">
			    	<a href="/admin/group/edit/id_{{$row['id'] }}">编辑权限</a>
					<if condition="$row['id'] gt '3'">
			    	<a href="/admin/group/del/id_{{$row['id'] }}" ><i class="del"></i>删除用户组</a>
					</if>
			    </td>
		    </tr>
		   </foreach>
	  </tbody>
</table>
<script>
layui.use('table', function(){
  var table = layui.table;
});
</script>

<php> $this->display(tpl('foot')); </php>
